@(selectedCat:Byte = -1, isSelect:Boolean = false)
@if(isSelect){
  <select id="cat-select" name="category">
} else {
  <ul id="cats" class="block">
}
@models.Post.Category.values.toList.map { c =>
  @if(isSelect){
    @if(selectedCat == c.id){
      <option value=@c.id selected="selected">@c.toString</option>
    } else {
      <option value=@c.id>@c.toString</option>
    }
  } else {
    <li id=@c.id>@c.toString</li>
  }
}

@if(isSelect){
  </select>
} else {
  </ul>
}
